package de.haw.ai3.bs.aufgabe3.a1;

public class Starter extends Thread {

	/**
	 * @param args
	 */
	public static void main(String[] args) {

		Kasse[] kassen = new Kasse[3];
		kassen[0] = new Kasse(0);
		kassen[1] = new Kasse(1);
		kassen[2] = new Kasse(2);
		KassenWrapper kassenW = new KassenWrapper(kassen);

		Student studenten[] = new Student[10];
		for (int i = 0; i < studenten.length; i++) {
			studenten[i] = new Student(i, kassenW);
		}
		// for (int i = 0; i < studenten.length; i++) {
		// studenten[i] = new Student(i, kassen);
		// }
		for (Student student : studenten) {
			student.start();
		}

		try {
			sleep(2000);
		} catch (InterruptedException e) {
			// Mache nichts
		}

		for (Student student : studenten) {
			student.interrupt();
		}
	}
}
